<template>
	<view class="out">
		<input type="text" placeholder="请输入名" v-model="fistname"/>
		<input type="text" placeholder="请输入姓" v-model="lastname"/>
		<view>全称：{{allname}}</view>
	</view>
</template>

<script setup>
	import {ref,computed} from 'vue';
	const fistname = ref('');
	const lastname = ref('');
	const allname = computed(()=>fistname.value + '-' + lastname.value)
</script>

<style lang="scss" scoped>
	.out {
		margin: 25px 0;
		input {
			margin: 5px 15px;
			padding: 0 10px;
			border: 1px solid #ccc;
		};
		view {
			text-align: center;
		};
	}
</style>






